<script setup lang="ts">
import { Upload } from 'vexip-ui'

const url = defineModel<string | undefined>({ required: true })
</script>

<template>
  <Upload
    url="/api/v1/upload"
    :filter="['jpeg', 'jpg', 'png', 'gif']"
    @success="(_, response) => (url = response.value)"
    with-credentials
    image
  />
</template>
